<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <script type="text/javascript" charset="UTF-8" src="../../script/naes.js"></script>
    <script type="text/javascript" src="../../script/constants.js"></script>
    <style>
    	body{
    		margin: 0;
    	}
    </style>
</head>
<body>
	<header id="statusBar">
		<div style="width:100%;display:table;background: #fff;position:fixed;border-bottom:1px solid #EAEAEA;z-index: 9999;height: 50px;" >
			<div style="float:left;width: 20%;height: 50px;line-height: 50px;" tapmode="presshover" onclick="api.closeWin();">
			  <div style="float:left;width: 30%;height: 50px;">
			   <img style="width: 24px;margin-top: 13px;" src="../../image/blc_back.png" />
			   </div>
			   <div style="float:left;width: 50%;">
			   返回
			   </div>
			</div>
			<div style="float:left;width: 60%;height: 50px;line-height: 50px;text-align: center;font-weight:bold;">
			 收款记录
			</div>
		</div>
	</header>
	
	<div style="height:70px"></div>
	<div style="display: table;width: 100%;">
	   <!--<div style="float: left;width: 50%;text-align: center;">
	      <img src="../../image/jhzf/today.png" style="width:50%;margin: 0 auto;" />
	   </div>
	   <div style="float: left;width: 50%;text-align: center;">
	      <img src="../../image/jhzf/history.png" style="width:50%;margin: 0 auto;" />
	   </div>-->
	   <div style="margin-top:20px;float:left;width:50%;text-align: center;" tapmode="presshover" onclick="today();">
		<div style="height:90px">
		<img style="width:50%;" src="../../image/jhzf/today.png"/>
		</div>
		<div style="">
		今日记录
		</div>
		</div>
		<div style="margin-top:20px;float:left;width:50%;text-align: center;" tapmode="presshover" onclick="history();">
		<div style="height:90px">
		<img style="width:50%;" src="../../image/jhzf/history.png"/>
		</div>
		<div style="">
		历史纪录
		</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript">
    var memberid = "";
	apiready = function(){
	    api.parseTapmode();
	    if(api.systemType == "ios"){
           document.getElementById("statusBar").style.background = "#298cb4";
        }
	    $api.fixStatusBar( $api.dom('header') );
		memberid = api.pageParam.merid;
	};
	
	function today(){
	    var callback = function(data, err){
             if(data){
				if(data.success){
				var list = data.list;
				api.openWin({
                     name: 'today',
                     url: './today.html',
                     pageParam: {
                        merid: memberid,
                        merList: list
                     }
                 });
				}else{
				  api.alert({msg: data.msg});
				}
			 }else{
			  api.alert({msg: JSON.stringify(err)});
			 }
        }
        var content = {"phone" : $api.getStorage("dl_phone")};//$api.getStorage("dl_phone")
        apiAjax(JSON.stringify(content),url.collection,callback);
	}
	
	function history(){
	    var callback = function(data, err){
             if(data){
				if(data.success){
				var list = data.list;
				api.openWin({
                     name: 'history',
                     url: './history.html',
                     pageParam: {
                        merid: memberid,
                        merList: list
                     }
                 });
				}else{
				  api.alert({msg: data.msg});
				}
			 }else{
			  api.alert({msg: JSON.stringify(err)});
			 }
        }
        var content = {"phone" : $api.getStorage("dl_phone")};//$api.getStorage("dl_phone")
        apiAjax(JSON.stringify(content),url.collection,callback);
	}
</script>
</html>